-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Update 3.3-di-changes.rst #10313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update 3.3-di-changes.rst #10313
Conversation
Looking at deprecations of 4.2, I noticed that extending `AbstractController` will prevent you from getting the services (even public ones) from container. This should be reported.
service_container/3.3-di-changes.rst
Outdated
|
||
If you get rid of deprecations and extend `AbstractController` instead of `Controller` for | ||
your controllers, you can skip the rest of this step as `AbstractController` won't provide | ||
a containe where you can get the services directly. All services need to be injected as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
containe
-> container
service_container/3.3-di-changes.rst
Outdated
|
||
.. note:: | ||
|
||
If you get rid of deprecations and extend `AbstractController` instead of `Controller` for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the RST format used in Symfony Docs, code uses two backticks instead of one (like in Markdown):
... ``AbstractController`` instead of ``Controller`` ...
service_container/3.3-di-changes.rst
Outdated
If you get rid of deprecations and extend `AbstractController` instead of `Controller` for | ||
your controllers, you can skip the rest of this step as `AbstractController` won't provide | ||
a containe where you can get the services directly. All services need to be injected as | ||
explained in `Step 5 Cleanup`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a link to an absolute URL, we can link to a specific part of this article. First, change the link of this line by this:
explained in the :ref:`step 5 of this article <step-5>`.
Then, in the line 718 of this article, add the following reference before Step 5) Cleanup!
:
.. _step-5:
Step 5) Cleanup!
~~~~~~~~~~~~~~~~
...
Finally, you can remove this link at the bottom of the article: .. _
Step 5 Cleanup: https://github.com/symfony/symfony-docs/blob/master/service_container/3.3-di-changes.rst#step-5-cleanup
@javiereguiluz is it ok now? |
Almost OK :) The last thing is to add the .. _step-5:
Step 5) Cleanup!
~~~~~~~~~~~~~~~~
[...] |
Done! 😃 |
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #10313). Discussion ---------- Update 3.3-di-changes.rst Looking at deprecations of 4.2, I noticed that extending `AbstractController` will prevent you from getting the services (even public ones) from container. This should be reported. <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/roadmap for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `master` for features of unreleased versions). --> Commits ------- f16e631 Update 3.3-di-changes.rst
@DonCallisto thanks for improving the docs and for your patience during the review process! Note: GitHub shows this PR as "closed" instead of "merged" because we squashed your commits while merging ... but it's "merged". |
Thank you for guiding me. Cheers 🍻 |
Looking at deprecations of 4.2, I noticed that extending
AbstractController
will prevent you from getting the services (even public ones) from container. This should be reported.